package com.gzz.orchid.context.application.base;

import com.gzz.orchid.common.core.model.ActionCmd;
import com.gzz.orchid.context.application.base.command.ConfigurationSaveCmd;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

public interface IConfigurationExecutor {
    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void save(ConfigurationSaveCmd saveCmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void delete(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void disable(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void enable(ActionCmd cmd);

    @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
    void audit(ActionCmd cmd);
}
